The MPLS-TP is a connection-oriented packet transfer technology based on multiprotocol label switching (MPLS) defined by the International Telecommunications Union (ITU-T). The MPLS-TP data forwarding plane is a subset of the MPLS, the data of which is forwarded based on the MPLS-TP label. MPLS-TP is the application of MPLS in a transfer network, which simplifies some complicated functions of the MPLS data forwarding plane and increases functions such as connection-oriented operation administration and maintenance (OAM) and protection recovery and so on.
The configuration of the MPLS-TP tunnel is on nodes. Each node is a segment of the tunnel, there are ingresses and egresses on the nodes, but not all the nodes have ingresses or egresses. There is no ingress at the head of the tunnel (i.e. head node), and the absent ingress is replaced by an example access; and likewise, there is no egress at the tail of the tunnel (i.e. tail node), and the absent egress is replaced by an example access also. Usually, the processing at the head node portion of the tunnel is referred to as uplink processing of the tunnel, and the processing at the tail node portion of the tunnel is referred to as downlink processing of the tunnel.
The configuration of the MPLS-TP service is mainly divided into two portions, which are respectively an example portion and an MPLS-TP tunnel portion. The example portion is mainly used to access the data message at the private network user side to the public network tunnel side or access the data message at the public network tunnel side to the private network user side. The configuration near the private network user side is referred to as a user side interface (CIP) configuration, which includes the information of user access (such as interface type and interface content); and the configuration near the public network tunnel side is referred to as a public network side interface (VIP) configuration, which includes a public network label table, a private network label table and information of a next hop node; during configuration, the tunnel information is usually bound on the VIP to determine the next hop node and the public network label of this tunnel.
There are mainly two protection types of the MPLS-TP tunnel, which are respectively:
protection type 1+1, at the ingress of the tunnel (i.e., at the head node), the data message will be copied as two copies, one of them will be sent to the primary tunnel, and the other will be sent to the backup tunnel, i.e., protection tunnel; and at the egress of the tunnel (i.e., at the tail node), the data message will be analyzed and judged, if the current primary tunnel is valid, then the data message on the primary tunnel will be forwarded and the data message on the protection tunnel will be discarded, and if the current primary tunnel is invalid, then the data message on the primary tunnel will be discarded and the data message on the protection tunnel will be forwarded;
protection type 1:1, at the ingress of the tunnel, the tunnel state is judged, if the primary tunnel is valid, then the data message will be sent from the primary tunnel; and if the primary tunnel is invalid, then the data message will be sent from the protection tunnel.
During the practical data message processing, the operation of the data message is judged by querying table entries and then how to operate is decided, therefore it needs to pre-configure the table entries, including the public network label table and the private network label table. On the tunnel, the intermediate node only includes the public network label table, and the head node and the tail node simultaneously include the public network label table and the private network label table. In the related art, the table entry configuration of the tail node is as follows:
the public network label table: a public network label is taken as a key value and information of the corresponding tunnel end flag field (for judging whether the data message reaches the tail node) is written into this table; if the protection type configured by the tunnel end is 1+1 and the primary tunnel is valid, then information of the discard field is written into the public network label table corresponding to the protection tunnel (the data message is sent from the primary tunnel); and if the primary tunnel is failed, then information of the discard field is written into the public network label table corresponding to the primary tunnel, and at the same time the discard field in the public network label table corresponding to the protection tunnel is cleared (the data message is sent from the protection tunnel);
the private network label table: a private network label is taken as a key value, the corresponding routing information is written into this table, and the data message can be forwarded from the tail node of the current tunnel according to the routing information.
In the related art, the processing of the MPLS-TP tunnel 1+1 protection at the tail node is shown in FIG. 1, including the following steps.
In step 101, the current node extracts the public network label and the private network label from the received data message.
In steps 102-103, the current node first queries its own public network label table according to the public network label, and judges whether there is a public network label table corresponding to the public network label, i.e., judges whether a corresponding public network label table can be found according to the public network label, if no, step 103 is performed, and this node directly discards the data message (which indicates that the data message is forwarded to a wrong node); and if yes, step 104 is performed.
In steps 104-105, the current node confirms whether the tunnel end flag field in its own public network label table is valid, if the tunnel end flag field is invalid, it indicates that the data message has not reached the end of the tunnel and it still needs to be forwarded continuously; step 105 is performed, at this moment, this node replaces the public network label carried in the data message to the public network label corresponding to the next hop node according to the public network label table, and forwards the data message to the next hop node, the flow returns to step 101; and if the tunnel end flag field is valid, it indicates that the data message has reached the tunnel end (i.e., this node is the tail node of the tunnel), and step 106 is performed.
In step 106, the tail node queries its own private network label table according to the private network label, and judges whether there is a private network label table corresponding to the private network label, i.e., judges whether a corresponding private network label table can be found according to the private network label, if no, then step 103 is performed, in which the data message is directly discarded; and if yes, then step 107 is performed.
In step 107, it is judged whether the discard field in the public network label table is valid, if the discard field valid, it indicates that the current tunnel is invalid, and step 103 is performed to discard the data message; and if the discard field is invalid, it indicates that the current tunnel is valid.
In step 108, the corresponding routing information is acquired from the private network label table, and subsequent forwarding is performed on the data message.
During the processing in the above solution, the tail node needs to query the table entries twice: firstly, querying the public network label table to judge whether the data message has reached the tail node, and secondly, querying the private network label table to confirm the forwarding route of the data message. For some network processors, querying the table entry needs to wait for several time cycles, which will affect the data processing performance and delay the forwarding of the data message.